<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        function getAjaxUserData() {
            return new Promise((resolve, reject) => {
                fetch('http://localhost:3000/users')
                    .then(data => data.json())
                    .then(data => {
                        resolve(data)
                    })
            })
        }
        (async function () {
            const users = await getAjaxUserData();
            console.log(users);

            fetch('http://localhost:3000/users',{
                method:'post',
                body: JSON.stringify({
                        id: "100",
                        name: "鹏哥",
                        hometown: "赣州"
                    })
            })
        })()
    </script>
</body>

</html>